package com.xinghou.platform.dao.main.impl;


import java.sql.ResultSet;
import java.sql.SQLException;

import javax.annotation.Resource;

import org.springframework.jdbc.core.RowMapper;
import org.springframework.stereotype.Service;

import com.xinghou.platform.dao.bases.JdbcTemplate;
import com.xinghou.platform.dao.bases.database.CustomerContextHolder;
import com.xinghou.platform.dao.main.StoreImageTypeDAO;
import com.xinghou.platform.model.main.StoreImageType;

/**
 * @author liuwei.wen
 *
 */
@Service
public class StoreImageTypeDAOImpl  {/*

	@Resource
	private JdbcTemplate jdbcTemplate;

	@Override
	public StoreImageType getStoreImageTypename(Integer imageTypeId) {
		CustomerContextHolder.setCustomerType(CustomerContextHolder.DATA_SOURCE_READ);
		String sql="SELECT 	NAME FROM store_image_type where Image_type_id = ?";
		StoreImageType storeImageType = jdbcTemplate.queryForObject(sql, new Object[] {imageTypeId}, new StoreImageTypeMapper());
		CustomerContextHolder.clearCustomerType();
		return storeImageType;
	}

	private static final class StoreImageTypeMapper implements RowMapper<StoreImageType> {
		public StoreImageType mapRow(ResultSet rs, int rowNum) throws SQLException {
			StoreImageType storeImageType = new StoreImageType();
			storeImageType.setName(rs.getString("NAME"));
			return storeImageType;
		}
	}*/

}
